package com.crt.uav.annotation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Operation
@ApiResponses({
        @ApiResponse(responseCode = "200", description = "成功", content = @Content(mediaType = "application/json",
                schema = @Schema(title = "返回结果", description = "返回结果",
                        anyOf = {com.crt.uav.domain.Result.class, com.crt.uav.domain.UavSpeedVO.class, com.crt.uav.domain.UavNewNedVO.class}))),
        @ApiResponse(responseCode = "500", description = "响应错误", content = @Content(mediaType = "application/json",
                schema = @Schema(title = "返回结果", description = "返回结果",
                        implementation = com.crt.uav.domain.Result.class)))
})
public @interface UavOperation {
    String summary();
    String description();
    Parameter[] parameters() default {};
}
